package com.linux.huhx.utils;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by huhx on 2017-05-16.
 */
public class ReadFileUtil {
    public static String readFromFile(String filename) {
        String result = null;
        try {
            result = FileUtils.readFileToString(new File(filename));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return result;
    }
}
